﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using model;
using Bll;
using System.IO;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            AppIntroBll bll = new AppIntroBll();
            List<AppIntro> appintro=bll.Getlist();
            ListView1.DataSource = appintro;
            ListView1.DataBind();
            Repeater1.DataSource = appintro;
            Repeater1.DataBind();
        }
        DirectoryInfo din = new DirectoryInfo(Server.MapPath("Pict"));
        FileInfo[] fs = din.GetFiles();
            foreach (FileInfo f in fs)
            {
                int len = f.Name.Length;
                string rd = "Eintro.aspx?ename=" + f.Name.Substring(0, len - 4) + "&pic=" + f.Name;
                photo.InnerHtml += "<a href=" + rd + "><img  style='height:50px;width:100px;' alt='" + f.Name.Substring(0, 2) + "' src='Pict/" + f.Name + "' border='0' /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                demo2.InnerHtml += "<div style='float:left;font-size:14px;width:120px;text-align:center'>" + f.Name.Substring(0, 6) + "</div>";
            }
    }
}